//
//  Pose.swift
//  SitPosition
//
//  Created by apple on 2019/2/3.
//  Copyright © 2019 apple. All rights reserved.
//

import Foundation
import UIKit

/**
 * 引用自SwiftOpenPose开源项目
 */
enum CocoPart: Int {
    case Nose = 0       // 鼻子
    case Neck = 1       // 脖子
    case RShoulder = 2  // 右肩
    case RElbow = 3     // 右手肘
    case RWrist = 4     // 右腕
    case LShoulder = 5  // 左肩
    case LElbow = 6     // 左手肘
    case LWrist = 7     // 左腕
    case RHip = 8       // 右臀部
    case RKnee = 9      // 右膝盖
    case RAnkle = 10    // 右脚踝
    case LHip = 11      // 左臀部
    case LKnee = 12     // 左膝盖
    case LAnkle = 13    // 左脚踝
    case REye = 14      // 右眼
    case LEye = 15      // 左眼
    case REar = 16      // 右耳
    case LEar = 17      // 左耳
    case Background = 18// 背景
}

let CocoPairs = [
    (1, 2), (1, 5), (2, 3),
    (3, 4), (5, 6), (6, 7),
    (1, 8), (8, 9), (9, 10),
    (1, 11), (11, 12), (12, 13),
    (1, 0), (0, 14), (14, 16),
    (0, 15), (15, 17), (2, 16),
    (5, 17)
]

let CocoPairsNetwork = [
    (12, 13), (20, 21), (14, 15),
    (16, 17), (22, 23), (24, 25),
    (0, 1), (2, 3), (4, 5),
    (6, 7), (8, 9), (10, 11),
    (28, 29), (30, 31), (34, 35),
    (32, 33), (36, 37), (18, 19),
    (26, 27)
]

let CocoPairsRender = CocoPairs[0..<CocoPairs.count-2]

let CocoColors = [UIColor.rgb(255, 0, 0),  UIColor.rgb(255, 85, 0), UIColor.rgb(255, 170, 0),UIColor.rgb(255, 255, 0),
                  UIColor.rgb(170, 255, 0),UIColor.rgb(85, 255, 0), UIColor.rgb(0, 255, 0),  UIColor.rgb(0, 255, 85),
                  UIColor.rgb(0, 255, 170),UIColor.rgb(0, 255, 255),UIColor.rgb(0, 170, 255),UIColor.rgb(0, 85, 255),
                  UIColor.rgb(0, 0, 255),  UIColor.rgb(85, 0, 255), UIColor.rgb(170, 0, 255),UIColor.rgb(255, 0, 255),
                  UIColor.rgb(255, 0, 170),UIColor.rgb(255, 0, 85)]
